Socket
Socket
Sign inDemoInstall

buffer-equals

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

buffer-equals

Node.js 0.12 buffer.equals() ponyfill


Version published
Weekly downloads
52K
decreased by-6.56%
Maintainers
1
Weekly downloads
 
Created
Source

buffer-equals Build Status

Node.js buffer.equals() ponyfill

Install

$ npm install --save buffer-equals

Usage

const bufferEquals = require('buffer-equals');

bufferEquals(new Buffer('foo'), new Buffer('foo'));
//=> true

bufferEquals(new Buffer('foo'), new Buffer('bar'));
//=> false

API

See the buffer.equals() docs.

The only difference is that you pass in the buffer as the first argument instead of calling the .equals() method on the buffer instance.

  • buf-compare - Node.js 0.12 Buffer.compare() ponyfill
  • buf-indexof - Node.js 4.0 buffer.indexOf() ponyfill

License

MIT © Sindre Sorhus

Keywords

FAQs

Package last updated on 30 Sep 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc